package cn.hp.service;

import cn.hp.entity.Announcement;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface AnnouncementService {
    public List<Announcement> selectAnnouncements(Announcement announcemen);

    /**
     * 查询所有公告（分页）
     * @param announcement 查询条件
     * @param page         页数
     * @param limit        条数
     * @return {@code PageInfo<Announcement>}
     */
    PageInfo<Announcement> selectAnnouncements(Announcement announcement, int page, int limit);

    int insertAnnouncement(Announcement announcement);

    int deleteAnnouncementById(Integer id);

    int updateAnnouncement(Announcement announcement);
}
